<?php
/*
Plugin Name: Chapter 2 - Object-Oriented - Private Item Text
Plugin URI: http://wordpress.org/extend/plugins/hello-dolly/
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page.
Author: Manh Nguyen
Version: 1.6
Author URI: http://hatrangcorp.com/
*/

class CH2_OO_Private_Item_Text{
	function __construct()
	{
		add_shortcode('private', array($this, 'ch2pit_private_shortcode'));
		add_action('wp_enqueue_scripts', array($this, 'ch2pit_queue_stylesheet'));
	}
	
	function ch2pit_private_shortcode($atts, $content = null)
	{
		if(is_user_logged_in())
		{
			return '<div class="private">' . $content . '</div>';
		}
		else
		{
			return '';
		}
	}
	
	function ch2pit_queue_stylesheet()
	{
		wp_enqueue_style('privateshortcodestyle', plugins_url('stylesheet.css', __FILE__));
	}
}



$my_ch2_oo_private_item_text = new CH2_OO_Private_Item_Text();

?>